
import java.util.*;
public class Example8_8 {
    public static void main(String args[]) {
       String sourceString = "今晚十点进攻";
       EncryptAndDecrypt person = new EncryptAndDecrypt(); 
       System.out.println("输入密码加密:"+sourceString);
	   Random password = new Random();
    password.nextInt();
String s=String.valueOf(password);
String secret= person.encrypt(sourceString,s);
       
       System.out.println("密文:"+secret);
       System.out.println("输入解密密码");
       password = new Random(10);
        String source = person.decrypt(secret,s);
       System.out.println("明文:"+source);
    }
}

